package game.config {
	/**
	 * @author yangyiqiang
	 */
	public class StaticConfig {
		/** 网页传入的userID  **/
		public static var userId : String;
		/** 资源路径  例如:要取创建角色的资源，路径可写成 StaticConfig.cdnRoot + "assets/createRole/createRoleSkin.swf **/
		public static var cdnRoot : String = "";
		/**语言类型*/
		public static var langString : String = "zh_CN";
		/** socket的IP 和 port **/
		public static var serversString : String  ;
		/** 是否是新用户 **/
		public static var isNewUser : Boolean;
		/** 平台名称 **/
		public static var channel : String ;
		/** 服务器编号 **/
		public static var gameNumber : int  ;
		/** 是否通过防沉迷 **/
		public static var wallow : String  ;
		
		/**初始化基本参数（参数从网页中传入） */
		public static function initConfig(obj : Object) : void {
			userId = obj["userid"] == undefined ? "7777" : obj["userid"];
			serversString = obj["gad"] == undefined ? "192.168.4.114:8880" : obj["gad"];
			//serversString = obj["gad"] == undefined ? "127.0.0.1:8880" : obj["gad"];
			cdnRoot = obj["cdnroot"] == undefined ? "../" : obj["cdnroot"];
			langString = obj["glocale"] == undefined ? "zh_CN" : obj["glocale"];
			channel = obj["channel"] == undefined ? "1" : obj["channel"];
			gameNumber = obj["game_no"] == undefined ? 1 : Number(obj["channel"]);
			isNewUser = obj["newuser"] == undefined ? false : Number(obj["newuser"]);
		}
	}
}
